import connect.IBaseAction
import connect.impl.UdpService

fun main() {
    val udpService = UdpService.getInstance()
    udpService.action = object : IBaseAction {
        override fun receiveMessage(msg: String) {
            println("tag: $msg")
        }

        override fun onError(msg: String) {
            println("tag: $msg")
        }
    }
    udpService.init(8889)
    udpService.sendUdpMessage("localhost", 8888, "hello")
    udpService.dispose()
}